<?php
/*
 * 缩略图的上传
 * @author     Mark <zhaody901@126.com>
 * @copyright  Copyright (c) 2013 lemon team
 * @version    $Id: 8ae8c080e465a9b5f49b147d7dca61d390a28310 $
 * @time       14-2-7 上午10:15
 */
require_once '../../common.inc.php';
Session::start();
$uModuleid = intval(getgpc('uModuleid'));
$uSource   = strval(getgpc('uSource'));
$uAuth     = strval(getgpc('uAuth'));
$uHeight   = intval(getgpc('uHeight'));
$uWidth    = intval(getgpc('uWidth'));
$uOld      = strval(getgpc('uOld'));

$upload = new ThumbUpload();
$upload->setSource($uModuleid, $uSource);
$upload->setUserid($_userid);
$upload->setSize($uWidth, $uHeight);

if (!$upload->checkSwfAuth($uAuth)) {
	$upload->error();
}
if ($upload->save($_FILES[$uModuleid . '_' . $uSource])) {
	$upload->ok();
} else {
	$upload->error();
}